package com.baizhi.utils;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class ThreadPollUtil {
    /***
     * corePoolSize 用于指定核心线程数量
     */
    private static int corePoolSize = Runtime.getRuntime().availableProcessors();
    public static ThreadPoolExecutor executor = new ThreadPoolExecutor(corePoolSize,corePoolSize+1,101, TimeUnit.SECONDS,
            new LinkedBlockingQueue<Runnable>(1000));
}
